using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._RasterAnalysisTools._UseProximity
{
    /// <summary>
    /// <para>Calculate Travel Cost</para>
    /// <para>Calculates the least accumulative cost distance from or to the least-cost source, while accounting for surface distance along with horizontal and vertical cost factors.</para>
    /// <para>计算与最低成本源之间的最小累积成本距离，同时考虑表面距离以及水平和垂直成本系数。</para>
    /// </summary>    
    [DisplayName("Calculate Travel Cost")]
    public class CalculateTravelCost : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CalculateTravelCost()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_inputSourceRasterOrFeatures">
        /// <para>Input Source Raster or Features</para>
        /// <para>The layer that defines the sources to calculate the distance to. The layer can be raster or feature.</para>
        /// <para>定义要计算到的距离的源的图层。图层可以是栅格图层，也可以是要素图层。</para>
        /// </param>
        /// <param name="_outputDistanceName">
        /// <para>Output Distance Name</para>
        /// <para><xdoc>
        ///   <para>The name of the output distance raster service.</para>
        ///   <para>The cost distance image service identifies, for each cell, the least accumulative cost distance over a cost surface to the identified source locations.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出距离栅格服务的名称。</para>
        ///   <para>成本距离影像服务标识每个像元到已识别源位置的成本图面上的最小累积成本距离。</para>
        /// </xdoc></para>
        /// </param>
        public CalculateTravelCost(object _inputSourceRasterOrFeatures, object _outputDistanceName)
        {
            this._inputSourceRasterOrFeatures = _inputSourceRasterOrFeatures;
            this._outputDistanceName = _outputDistanceName;
        }
        public override string ToolboxName => "Raster Analysis Tools";

        public override string ToolName => "Calculate Travel Cost";

        public override string CallName => "ra.CalculateTravelCost";

        public override List<string> AcceptEnvironments => ["cellSize", "extent", "mask", "outputCoordinateSystem", "snapRaster"];

        public override object[] ParameterInfo => [_inputSourceRasterOrFeatures, _outputDistanceName, _inputCostRaster, _inputSurfaceRaster, _maximumDistance, _inputHorizontalRaster, _horizontalFactor, _inputVerticalRaster, _verticalFactor, _sourceCostMultiplier, _sourceStartCost, _sourceResistanceRate, _sourceCapacity, _sourceTravelDirection.GetGPValue(), _outputBacklinkName, _outputAllocationName, _allocationField, _outputDistanceRaster, _outputBacklinkRaster, _outputAllocationRaster];

        /// <summary>
        /// <para>Input Source Raster or Features</para>
        /// <para>The layer that defines the sources to calculate the distance to. The layer can be raster or feature.</para>
        /// <para>定义要计算到的距离的源的图层。图层可以是栅格图层，也可以是要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Source Raster or Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _inputSourceRasterOrFeatures { get; set; }


        /// <summary>
        /// <para>Output Distance Name</para>
        /// <para><xdoc>
        ///   <para>The name of the output distance raster service.</para>
        ///   <para>The cost distance image service identifies, for each cell, the least accumulative cost distance over a cost surface to the identified source locations.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出距离栅格服务的名称。</para>
        ///   <para>成本距离影像服务标识每个像元到已识别源位置的成本图面上的最小累积成本距离。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Distance Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputDistanceName { get; set; }


        /// <summary>
        /// <para>Input Cost Raster</para>
        /// <para><xdoc>
        ///   <para>A raster defining the impedance or cost to move planimetrically through each cell.</para>
        ///   <para>The value at each cell location represents the cost-per-unit distance for moving through the cell. Each cell location value is multiplied by the cell resolution while also compensating for diagonal movement to obtain the total cost of passing through the cell.</para>
        ///   <para>The values of the cost raster can be integer or floating point, but they cannot be negative or zero (you cannot have a negative or zero cost).</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义在每个像元中平面移动的阻抗或成本的栅格。</para>
        ///   <para>每个像元位置的值表示在像元中移动的单位距离成本。每个像元位置值乘以像元分辨率，同时还补偿对角线移动，以获得通过像元的总成本。</para>
        ///   <para>成本栅格的值可以是整数或浮点，但不能为负数或零（不能为负数或零成本）。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Cost Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputCostRaster { get; set; } = null;


        /// <summary>
        /// <para>Input Surface Raster</para>
        /// <para>A raster defining the elevation values at each cell location. The values are used to calculate the actual surface distance covered when passing between cells.</para>
        /// <para>定义每个像元位置的高程值的栅格。这些值用于计算在单元之间通过时覆盖的实际表面距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Surface Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputSurfaceRaster { get; set; } = null;


        /// <summary>
        /// <para>Maximum Distance</para>
        /// <para>Defines the threshold that the accumulative cost values cannot exceed.</para>
        /// <para>定义累计成本值不能超过的阈值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _maximumDistance { get; set; } = null;


        /// <summary>
        /// <para>Input Horizontal Raster</para>
        /// <para><xdoc>
        ///   <para>A raster defining the horizontal direction at each cell.</para>
        ///   <para>The values on the raster must be integers ranging from 0 to 360, with 0 degrees being north, or toward the top of the screen, and increasing clockwise. Flat areas should be given a value of -1.</para>
        ///   <para>The values at each location will be used in conjunction with the Horizontal Factor to determine the horizontal cost incurred when moving from a cell to its neighbors.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义每个像元的水平方向的栅格。</para>
        ///   <para>栅格上的值必须是介于 0 到 360 之间的整数，其中 0 度表示北或朝向屏幕顶部，并顺时针递增。平坦区域的值应为 -1。</para>
        ///   <para>每个位置的值将与水平因子结合使用，以确定从像元移动到其相邻单元时产生的水平成本。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Horizontal Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputHorizontalRaster { get; set; } = null;


        /// <summary>
        /// <para>Horizontal Factor</para>
        /// <para><xdoc>
        ///   <para>The Horizontal Factor defines the relationship between the horizontal cost factor and the horizontal relative moving angle.</para>
        ///   <para>There are several factors with modifiers from which to select that identify a defined horizontal factor graph. The graphs are used to identify the horizontal factor used in calculating the total cost of moving into a neighboring cell.</para>
        ///   <para>In the explanations below, two acronyms are used: HF stands for horizontal factor, which defines the horizontal difficulty encountered when moving from one cell to the next; and HRMA stands for horizontal relative moving angle, which identifies the angle between the horizontal direction from a cell and the moving direction.</para>
        ///   <para>There are several types of horizontal factor available:</para>
        ///   <bulletList>
        ///     <bullet_item>Binary—Indicates that if the HRMA is less than the cut angle, the HF is set to the value associated with the zero factor; otherwise, it is infinity.</bullet_item><para/>
        ///     <bullet_item>Forward—Establishes that only forward movement is allowed. The HRMA must be greater or equal to 0 and less than 90 degrees (0 <= HRMA < 90). If the HRMA is greater than 0 and less than 45 degrees, the HF for the cell is set to the value associated with the zero factor. If the HRMA is greater than or equal to 45 degrees, the side value modifier value is used. The HF for any HRMA equal to or greater than 90 degrees is set to infinity.</bullet_item><para/>
        ///     <bullet_item>Linear—Specifies that the HF is a linear function of the HRMA.</bullet_item><para/>
        ///     <bullet_item>Inverse Linear—Specifies that the HF is an inverse linear function of the HRMA.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The default is Binary.</para>
        ///   <para>Characteristics for the horizontal keywords:</para>
        ///   <bulletList>
        ///     <bullet_item>Zero factor—Establishes the horizontal factor to be used when the HRMA is zero. This factor positions the y-intercept for any of the horizontal factor functions.</bullet_item><para/>
        ///     <bullet_item>Cut angle—Defines the HRMA angle beyond which the HF will be set to infinity.</bullet_item><para/>
        ///     <bullet_item>Slope—Establishes the slope of the straight line used with the Linear and Inverse Linear horizontal factor keywords. The slope is specified as a fraction of rise over run (for example, 45 percent slope is 1/45, which is input as 0.02222).</bullet_item><para/>
        ///     <bullet_item>Side value—Establishes the HF when the HRMA is greater than or equal to 45 degrees and less than 90 degrees when the Forward horizontal factor keyword is specified.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>水平因子定义水平成本因子与水平相对移动角度之间的关系。</para>
        ///   <para>有几个带有修饰符的因子可供选择，用于标识定义的水平因子图。这些图表用于识别用于计算搬入相邻单元的总成本的水平因子。</para>
        ///   <para>在下面的解释中，使用了两个首字母缩略词：HF 代表水平因子，它定义了从一个单元格移动到下一个单元格时遇到的水平困难;HRMA代表水平相对移动角，用于识别来自单元格的水平方向与移动方向之间的角度。</para>
        ///   <para>有几种类型的水平因子可用：</para>
        ///   <bulletList>
        ///     <bullet_item>二进制 （Binary） - 指示如果 HRMA 小于切削角，则 HF 设置为与零因子关联的值;否则，它是无穷大的。</bullet_item><para/>
        /// <bullet_item>向前 （Forward） - 确定只允许向前移动。HRMA 必须大于或等于 0 且小于 90 度 （0 <= HRMA < 90）。如果 HRMA 大于 0 且小于 45 度，则像元的 HF 设置为与零因子关联的值。如果 HRMA 大于或等于 45 度，则使用边值修饰符值。任何等于或大于 90 度的 HRMA 的 HF 设置为无穷大。</bullet_item><para/>
        ///     <bullet_item>线性 （Linear） - 指定 HF 是 HRMA 的线性函数。</bullet_item><para/>
        ///     <bullet_item>反线性 （Inverse Linear） - 指定 HF 是 HRMA 的反线性函数。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>默认值为 Binary。</para>
        ///   <para>水平关键字的特征：</para>
        ///   <bulletList>
        ///     <bullet_item>零因子 （Zero factor） - 确定当 HRMA 为零时要使用的水平因子。该因子定位任何水平因子函数的 y 截距。</bullet_item><para/>
        ///     <bullet_item>切割角度 （Cut angle） - 定义 HRMA 角度，超过该角度，HF 将设置为无穷大。</bullet_item><para/>
        ///     <bullet_item>坡度 - 建立与线性和反线性水平因子关键字一起使用的直线坡度。斜率指定为运行上升的分数（例如，45% 的斜率为 1/45，输入为 0.02222）。</bullet_item><para/>
        ///     <bullet_item>边值 - 当 HRMA 大于或等于 45 度时建立 HF，当指定前向水平因子关键字时小于 90 度时，建立 HF。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Horizontal Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _horizontalFactor { get; set; } = null;


        /// <summary>
        /// <para>Input Vertical Raster</para>
        /// <para>A raster defining the vertical (z) value for each cell.</para>
        /// <para>定义每个像元的垂直 （z） 值的栅格。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Vertical Raster")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _inputVerticalRaster { get; set; } = null;


        /// <summary>
        /// <para>Vertical Factor</para>
        /// <para><xdoc>
        ///   <para>The Vertical Factor defines the relationship between the vertical cost factor and the vertical relative moving angle (VRMA).</para>
        ///   <para>There are several factors with modifiers from which to select that identify a defined vertical factor graph. The graphs are used to identify the vertical factor used in calculating the total cost for moving into a neighboring cell.</para>
        ///   <para>In the explanations below, two acronyms are used: VF stands for vertical factor, which defines the vertical difficulty encountered in moving from one cell to the next; and VRMA stands for vertical relative moving angle, which identifies the slope angle between the FROM or processing cell and the TO cell.</para>
        ///   <para>There are several types of vertical factor available:</para>
        ///   <bulletList>
        ///     <bullet_item>Binary—Specifies that if the VRMA is greater than the low-cut angle and less than the high-cut angle, the VF is set to the value associated with the zero factor; otherwise, it is infinity.</bullet_item><para/>
        ///     <bullet_item>Linear—Indicates that the VF is a linear function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Symmetric Linear—Specifies that the VF is a linear function of the VRMA in either the negative or positive side of the VRMA, respectively, and the two linear functions are symmetrical with respect to the VF (y) axis.</bullet_item><para/>
        ///     <bullet_item>Inverse Linear—Indicates that the VF is an inverse linear function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Symmetric Inverse Linear—Specifies that the VF is an inverse linear function of the VRMA in either the negative or positive side of the VRMA, respectively, and the two linear functions are symmetrical with respect to the VF (y) axis.</bullet_item><para/>
        ///     <bullet_item>Cos—Identifies the VF as the cosine-based function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Sec—Identifies the VF as the secant-based function of the VRMA.</bullet_item><para/>
        ///     <bullet_item>Cos-Sec—Specifies that the VF is the cosine-based function of the VRMA when the VRMA is negative and the secant-based function of the VRMA when the VRMA is nonnegative.</bullet_item><para/>
        ///     <bullet_item>Sec-Cos—Specifies that the VF is the secant-based function of the VRMA when the VRMA is negative and the cosine-based function of the VRMA when the VRMA is nonnegative.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>The default is Binary.</para>
        ///   <para>Characteristics for the vertical keywords:</para>
        ///   <bulletList>
        ///     <bullet_item>Zero factor—Establishes the vertical factor used when the VRMA is zero. This factor positions the y-intercept of the specified function. By definition, the zero factor is not applicable to any of the trigonometric vertical functions (COS, SEC, COS-SEC, or SEC-COS). The y-intercept is defined by these functions.</bullet_item><para/>
        ///     <bullet_item>Low Cut angle—Defines the VRMA angle below which the VF will be set to infinity.</bullet_item><para/>
        ///     <bullet_item>High Cut angle—Defines the VRMA angle above which the VF will be set to infinity.</bullet_item><para/>
        ///     <bullet_item>Slope—Establishes the slope of the straight line used with the Linear and Inverse Linear vertical-factor keywords. The slope is specified as a fraction of rise over run (for example, 45 percent slope is 1/45, which is input as 0.02222).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>垂直系数定义垂直成本系数与垂直相对移动角 （VRMA） 之间的关系。</para>
        ///   <para>有几个带有修饰符的因子可供选择，用于标识定义的垂直因子图。这些图表用于识别用于计算移动到相邻单元格的总成本的垂直因子。</para>
        ///   <para>在下面的解释中，使用了两个首字母缩略词：VF 代表垂直因子，它定义了从一个单元格移动到下一个单元格时遇到的垂直困难;VRMA代表垂直相对移动角，用于识别FROM或处理单元与TO单元之间的斜角。</para>
        ///   <para>有几种类型的垂直因子可用：</para>
        ///   <bulletList>
        ///     <bullet_item>二进制 （Binary） - 指定如果 VRMA 大于低切角且小于高切角，则 VF 设置为与零因子关联的值;否则，它是无穷大的。</bullet_item><para/>
        ///     <bullet_item>线性 — 指示 VF 是 VRMA 的线性函数。</bullet_item><para/>
        ///     <bullet_item>对称线性 （Symmetric Linear） - 指定 VF 分别是 VRMA 在 VRMA 的负侧或正侧的线性函数，并且两个线性函数相对于 VF （y） 轴是对称的。</bullet_item><para/>
        ///     <bullet_item>反线性 — 指示 VF 是 VRMA 的反线性函数。</bullet_item><para/>
        ///     <bullet_item>对称反线性 （Symmetric Inverse Linear） - 指定 VF 分别是 VRMA 在 VRMA 的负侧或正侧的反线性函数，并且两个线性函数相对于 VF （y） 轴对称。</bullet_item><para/>
        ///     <bullet_item>Cos - 将 VF 标识为 VRMA 的基于余弦的函数。</bullet_item><para/>
        ///     <bullet_item>秒 （Sec） - 将 VF 标识为 VRMA 的基于割线的函数。</bullet_item><para/>
        ///     <bullet_item>余秒 （Cos-Sec） - 指定当 VRMA 为负时，VF 是 VRMA 的基于余弦的函数，当 VRMA 为非负时，VF 是 VRMA 的基于正割的函数。</bullet_item><para/>
        ///     <bullet_item>Sec-Cos - 指定 VF 是 VRMA 的基于割线的函数，当 VRMA 为负时，指定 VF 是 VRMA 的基于余弦的函数。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>默认值为 Binary。</para>
        ///   <para>垂直关键词的特征：</para>
        ///   <bulletList>
        ///     <bullet_item>零因子 （Zero factor） - 建立 VRMA 为零时使用的垂直因子。此因子定位指定函数的 y 截距。根据定义，零因子不适用于任何三角垂直函数（COS、SEC、COS-SEC 或 SEC-COS）。y 截距由这些函数定义。</bullet_item><para/>
        ///     <bullet_item>低切削角度 （Low Cut angle） - 定义 VRMA 角度，低于该角度，VF 将设置为无穷大。</bullet_item><para/>
        ///     <bullet_item>高切割角度 （High Cut angle） - 定义 VRMA 角度，超过该角度，VF 将设置为无穷大。</bullet_item><para/>
        ///     <bullet_item>坡度 - 建立用于线性和反线性垂直因子关键字的直线坡度。斜率指定为运行上升的分数（例如，45% 的斜率为 1/45，输入为 0.02222）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Vertical Factor")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _verticalFactor { get; set; } = null;


        /// <summary>
        /// <para>Cost Multiplier</para>
        /// <para><xdoc>
        ///   <para>Multiplier to apply to the cost values.</para>
        ///   <para>Allows for control of the mode of travel or the magnitude at a source. The greater the multiplier, the greater the cost to move through each cell.</para>
        ///   <para>The values must be greater than zero. The default is 1.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>应用于成本值的乘数。</para>
        ///   <para>允许控制行进方式或源的大小。乘数越大，通过每个单元格移动的成本就越大。</para>
        ///   <para>这些值必须大于零。默认值为 1。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Cost Multiplier")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceCostMultiplier { get; set; } = null;


        /// <summary>
        /// <para>Start Cost</para>
        /// <para><xdoc>
        ///   <para>The starting cost from which to begin the cost calculations.</para>
        ///   <para>Allows for the specification of the fixed cost associated with a source. Instead of starting at a cost of zero, the cost algorithm will begin with the value set by Start Cost.</para>
        ///   <para>The values must be zero or greater. The default is 0.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>开始成本计算的起始成本。</para>
        ///   <para>允许指定与源关联的固定成本。成本算法不是从零成本开始，而是从“开始成本”设置的值开始。</para>
        ///   <para>这些值必须为零或更大。默认值为 0。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Start Cost")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceStartCost { get; set; } = null;


        /// <summary>
        /// <para>Resistance Rate</para>
        /// <para><xdoc>
        ///   <para>This parameter simulates the increase in the effort to overcome costs as the accumulative cost increases. It is used to model fatigue of the traveler. The growing accumulative cost to reach a cell is multiplied by the resistance rate and added to the cost to move into the subsequent cell.</para>
        ///   <para>It is a modified version of a compound interest rate formula that is used to calculate the apparent cost of moving through a cell. As the value of the resistance rate increases, it increases the cost of the cells that are visited later. The greater the resistance rate, the more additional cost is added to reach the next cell, which is compounded for each subsequent movement. Since the resistance rate is similar to a compound rate and generally the accumulative cost values are very large, small resistance rates are suggested, such as 0.02, 0.005, or even smaller, depending on the accumulative cost values.</para>
        ///   <para>The values must be zero or greater. The default is 0.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>此参数模拟随着累积成本的增加而增加克服成本的努力。它用于模拟旅行者的疲劳。到达一个电池的累积成本不断增长，乘以电阻率，并添加到进入后续电池的成本中。</para>
        ///   <para>它是复利利率公式的修改版本，用于计算通过单元格的表观成本。随着电阻率值的增加，它增加了以后访问的电池的成本。阻力率越大，到达下一个单元的额外成本就越多，每次后续运动都会增加成本。由于电阻率与复合率相似，并且通常累积成本值非常大，因此建议根据累积成本值使用较小的电阻率，例如0.02、0.005甚至更小。</para>
        ///   <para>这些值必须为零或更大。默认值为 0。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Resistance Rate")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceResistanceRate { get; set; } = null;


        /// <summary>
        /// <para>Capacity</para>
        /// <para><xdoc>
        ///   <para>Defines the cost capacity for the traveler for a source.</para>
        ///   <para>The cost calculations continue for each source until the specified capacity is reached.</para>
        ///   <para>The values must be greater than zero. The default capacity is to the edge of the output raster.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义旅行者对源的成本容量。</para>
        ///   <para>继续计算每个源的成本，直到达到指定的容量。</para>
        ///   <para>这些值必须大于零。默认容量为输出栅格的边缘。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Capacity")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _sourceCapacity { get; set; } = null;


        /// <summary>
        /// <para>Travel Direction</para>
        /// <para><xdoc>
        ///   <para>Defines the direction of the traveler when applying horizontal and vertical factors, the source resistance rate, and the source starting cost.</para>
        ///   <bulletList>
        ///     <bullet_item>From source—The horizontal factor, vertical factor, source resistance rate, and source starting cost will be applied beginning at the input source, and moving out to the non-source cells. This is the default.</bullet_item><para/>
        ///     <bullet_item>To source—The horizontal factor, vertical factor, source resistance rate, and source starting cost will be applied beginning at each non-source cell and moving back to the input source.</bullet_item><para/>
        ///   </bulletList>
        ///   <para>Either specify the From source or To source keyword, which will be applied to all sources, or specify a field in the source data that contains the keywords to identify the direction of travel for each source. That field must contain the strings FROM_SOURCE or TO_SOURCE.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>定义应用水平和垂直因子时行走者的方向、源电阻率和源启动成本。</para>
        ///   <bulletList>
        ///     <bullet_item>从源 - 水平因子、垂直因子、源电阻率和源启动成本将从输入源开始应用，并移至非源单元。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>到源 - 水平因子、垂直因子、源电阻率和源启动成本将从每个非源像元开始应用，并移回输入源。</bullet_item><para/>
        ///   </bulletList>
        ///   <para>指定将应用于所有源的“从源”或“到源”关键字，或者在源数据中指定包含关键字的字段，以标识每个源的行进方向。该字段必须包含字符串 FROM_SOURCE 或 TO_SOURCE。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel Direction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _sourceTravelDirection_value? _sourceTravelDirection { get; set; } = null;

        public enum _sourceTravelDirection_value
        {
            /// <summary>
            /// <para>From source</para>
            /// <para>From source—The horizontal factor, vertical factor, source resistance rate, and source starting cost will be applied beginning at the input source, and moving out to the non-source cells. This is the default.</para>
            /// <para>从源 - 水平因子、垂直因子、源电阻率和源启动成本将从输入源开始应用，并移至非源单元。这是默认设置。</para>
            /// </summary>
            [Description("From source")]
            [GPEnumValue("FROM_SOURCE")]
            _FROM_SOURCE,

            /// <summary>
            /// <para>To source</para>
            /// <para>To source—The horizontal factor, vertical factor, source resistance rate, and source starting cost will be applied beginning at each non-source cell and moving back to the input source.</para>
            /// <para>到源 - 水平因子、垂直因子、源电阻率和源启动成本将从每个非源像元开始应用，并移回输入源。</para>
            /// </summary>
            [Description("To source")]
            [GPEnumValue("TO_SOURCE")]
            _TO_SOURCE,

        }

        /// <summary>
        /// <para>Output Backlink Name</para>
        /// <para><xdoc>
        ///   <para>The name of the output backlink raster service.</para>
        ///   <para>The backlink raster contains values of 0 through 360, which define the direction along the least accumulative cost path from a cell to reach its least-cost source, while accounting for surface distance as well as horizontal and vertical surface factors.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出反向链接栅格服务的名称。</para>
        ///   <para>反向链接栅格包含 0 到 360 的值，这些值定义了从像元到到达其成本最低源的累积成本最低路径的方向，同时考虑了表面距离以及水平和垂直表面因素。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Backlink Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _outputBacklinkName { get; set; } = null;


        /// <summary>
        /// <para>Output Allocation Name</para>
        /// <para><xdoc>
        ///   <para>The name of the output allocation raster service.</para>
        ///   <para>This raster identifies the zone of each source location (cell or feature) that could be reached with the least accumulative cost.</para>
        ///   <para>The output raster is of integer type.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>输出分配栅格服务的名称。</para>
        ///   <para>此栅格可识别每个源位置（像元或要素）的区域，这些区域可以最小的累积成本到达。</para>
        ///   <para>输出栅格为整数类型。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Allocation Name")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _outputAllocationName { get; set; } = null;


        /// <summary>
        /// <para>Allocation Field</para>
        /// <para>A field on the source input that holds the values that define each source.</para>
        /// <para>源输入上的一个字段，用于保存定义每个源的值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Allocation Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _allocationField { get; set; } = null;


        /// <summary>
        /// <para>Output Distance Raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Distance Raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputDistanceRaster { get; set; }


        /// <summary>
        /// <para>Output Backlink Raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Backlink Raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputBacklinkRaster { get; set; }


        /// <summary>
        /// <para>Output Allocation Raster</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Allocation Raster")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputAllocationRaster { get; set; }


        public CalculateTravelCost SetEnv(object cellSize = null, object extent = null, object mask = null, object outputCoordinateSystem = null, object snapRaster = null)
        {
            base.SetEnv(cellSize: cellSize, extent: extent, mask: mask, outputCoordinateSystem: outputCoordinateSystem, snapRaster: snapRaster);
            return this;
        }

    }

}